package cn.lsp.sharkmall.service;

import cn.lsp.sharkmall.pojo.entity.UserAddress;
import cn.lsp.sharkmall.pojo.vo.UserAddressVO;

import java.util.List;

/**
 * @Description:
 * @Author: sweeterjava@163.com
 * @Date: 2023/2/13
 * @Time: 00:51
 */
public interface IUserAddressService {
    /**
     * 获取我的收货地址
     *
     * @param userId
     * @return
     */
    List<UserAddressVO> getMyAddresses(Long userId);

    /**
     * 保存收货地址
     *
     * @param userAddress
     * @return
     */
    Boolean saveUserAddress(UserAddress userAddress);

    /**
     * 修改收货地址
     *
     * @param userAddress
     * @return
     */
    Boolean updateUserAddress(UserAddress userAddress);

    /**
     * 获取收货地址详情
     *
     * @param addressId
     * @return
     */
    UserAddress getUserAddressById(Long addressId);

    /**
     * 获取我的默认收货地址
     *
     * @param userId
     * @return
     */
    UserAddress getMyDefaultAddressByUserId(Long userId);

    /**
     * 删除收货地址
     *
     * @param addressId
     * @return
     */
    Boolean deleteById(Long addressId);
}
